// 不带头节点的尾插法
#include <stdio.h>
#include <stdlib.h>

typedef struct Node
{
    /* data */
    int data;
    struct Node *next;
} Node, *LinkList;

LinkList Out_Insert(LinkList &L)
{
    Node *s, *r = NULL;
    L = NULL;
    int x;
    scanf("%d", &x);
    while (x != -1)
    {
        s = (Node *)malloc(sizeof(Node));
        s->data = x;
        s->next = NULL;
        if (L == NULL)
        {
            L = s;
        }
        else
        {
            r->next = s;
        }
        r = s;
        scanf("%d", &x);
    }
    return L;
}

int main()
{
    LinkList L;
    Out_Insert(L);
    return 0;
}